<?php
$base = "http://" . $_SERVER['SERVER_NAME'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
    <head>
        <meta charset="utf-8">            
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <meta name="description" content="">
                    <meta name="author" content="">

                        <!-- Le styles -->
                        <script src="<?= $base ?>/bootstrap/js/jquery.min.js"></script>
                        <link href="<?= $base ?>/bootstrap/css/bootstrap.css" rel="stylesheet" />
                        <script src="<?= $base ?>/bootstrap/js/bootstrap.js"></script>  
                        <script src="<?= $base ?>/js/jquery.json-2.3.min.js" type="text/javascript"></script>
                        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
                        <style type="text/css">
                            body {
                                padding-top: 60px;
                                padding-bottom: 40px;
                            }
                        </style>
                        <link href="<?= $base ?>/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

                            <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
                            <!--[if lt IE 9]>
                              <script src="<?= $base ?>/bootstrap/js/html5shiv.js"></script>
                            <![endif]-->

                            <!-- Fav and touch icons -->    
                            <!--<link rel="shortcut icon" href="../assets/ico/favicon.png">-->
                            </head>

                            <body>

                                <div class="navbar navbar-fixed-top">
                                    <div class="navbar-inner">
                                        <div class="container">
                                            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                                                <span class="icon-bar"></span>
                                                <span class="icon-bar"></span>
                                                <span class="icon-bar"></span>
                                            </button>
                                            <a class="brand" href="<?= $this->url(array(), 'admin-home'); ?>">ADMIN</a>
                                            <div class="nav-collapse collapse">
                                                <ul class="nav pull-right">
                                                    <?php
                                                    if (Zend_Auth::getInstance()->hasIdentity()):
                                                        $userEmail = Zend_Auth::getInstance()->getIdentity()->email;
                                                        ?>
                                                        <li><a>Welcome, <b><?= $userEmail ?></b></a></li>
                                                        <li class="divider-vertical"></li>
                                                        <li key="home"><a href="<?= $this->url(array(), 'admin-home'); ?>"><i class="icon-home"></i> Dashboard</a></li>
                                                        <li class="divider-vertical"></li>                                                                                                                
                                                        <li class="dropdown" key="adminsettings"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-wrench"></i> Settings <b class="caret"></b></a>
                                                            <ul class="dropdown-menu">
                                                                <li key="home"><a href="<?= $this->url(array(), 'feedback-read'); ?>"><i class="icon-bookmark"></i> Feedback</a></li>
                                                                <li key="home"><a href="<?= $this->url(array(), 'admin-faq'); ?>"><i class="icon-question-sign"></i> FAQ</a></li>
                                                                <li key="home"><a href="<?= $this->url(array(), 'admin-tc'); ?>"><i class="icon-check"></i> T & C</a></li>
                                                                <li key="home"><a href="<?= $this->url(array(), 'admin-us'); ?>"><i class="icon-info-sign"></i> About Us</a></li>
                                                                <li class="divider"></li>
                                                                <li><a href="<?= $this->url(array(), 'events'); ?>"><i class="icon-bell"></i> Notifications Tracking</a></li>
                                                                <li class="divider"></li>
                                                                <li><a href="<?= $this->url(array(), 'admin-email'); ?>"><i class="icon-envelope"></i> Admin Email Settings</a></li>
                                                                <li><a href="<?= $this->url(array(), 'sendgrid'); ?>"><i class="icon-envelope"></i> Sendgrid Email Settings</a></li>
                                                                <li><a href="<?= $this->url(array(), 'fullonsms'); ?>"><i class="icon-comment"></i> FullOnSms Settings</a></li>
                                                                <li class="divider"></li>
                                                                <li><a href="<?= $this->url(array(), 'store'); ?>"><i class="icon-list-alt"></i> Stores</a></li>
                                                                <li><a href="<?= $this->url(array(), 'brand'); ?>"><i class="icon-list-alt"></i> Brand</a></li>
                                                                <li><a href="<?= $this->url(array(), 'menu-add'); ?>"><i class="icon-list-alt"></i> Menu</a></li>
                                                                <li class="divider"></li>
                                                                <li><a href="<?= $this->url(array(), 'state-add'); ?>"><i class="icon-globe"></i> State</a></li>
                                                                <li><a href="<?= $this->url(array(), 'city-add'); ?>"><i class="icon-globe"></i> City</a></li>
                                                                <li><a href="<?= $this->url(array(), 'zip-add'); ?>"><i class="icon-globe"></i> Zipcode</a></li>
                                                                <li class="divider"></li>
                                                                <li><a href="<?= $this->url(array(), 'admin-password-change'); ?>"><i class="icon-lock"></i> Change Password</a></li>
                                                            </ul>
                                                        </li>
                                                        <li class="divider-vertical"></li>
                                                        <li><a href="<?= $this->url(array(), 'admin-logout'); ?>"><i class="icon-off"></i> Logout</a></li>
                                                        <li class="divider-vertical"></li>
                                                    <?php else: ?>
                                                        <li><a href="<?= $this->url(array(), 'admin-login'); ?>"><i class="icon-off"></i>  Login</a></li>
                                                        <li class="divider-vertical"></li>
                                                    <?php endif; ?>
                                                    <li><a target="_blank" href="<?= $this->url(array(), 'home'); ?>"><i class="icon-arrow-right"></i> Go to Site</a></li>
                                                </ul>
                                            </div><!--/.nav-collapse -->
                                        </div>
                                    </div>
                                </div>

                                <div class="container">
                                    <?php echo $this->layout()->content ?>                           
                                    <hr>

                                        <footer>
                                            <p>&copy; SpearBall Inc. 2013</p>
                                        </footer>

                                </div> <!-- /container -->
                            </body>
                            </html>
